package com.zmn.plat.manager.dictionary;

/**
 * 类描述：三方平台类型
 *
 * @author qying
 * @since 2019/10/30 11:17
 */
public enum AppPlatConstant {

    //微信
    WECHAT(1, "微信"),
    //支付宝
    ALIPAY(2, "支付宝");

    public static AppPlatConstant getAppPlatByPlatCode(int paltCode) {
        switch (paltCode) {
            case 1:
                return WECHAT;
            case 2:
                return ALIPAY;
            default:
                return null;
        }
    }

    public static AppPlatConstant getAppPlatByPlatCode(byte paltCode) {
        switch (paltCode) {
            case 1:
                return WECHAT;
            case 2:
                return ALIPAY;
            default:
                return null;
        }
    }


    private int platCode;

    private String platName;

    AppPlatConstant(int platCode, String platName) {
        this.platCode = platCode;
        this.platName = platName;
    }

    public int getPlatCode() {
        return platCode;
    }

    public String getPlatName() {
        return platName;
    }

}
